﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CloudAppRestDemoWeb.Pages.Default" %>

<!doctype>

<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server">
  <title>SharePoint Cloud-hosted App REST Demo</title>
  <link rel="stylesheet" type="text/css" href="../Content/styles.css" />
  <script type="text/javascript" src="../Scripts/jquery-1.7.2.js"></script>
  <script type="text/javascript" src="../Scripts/Default.js"></script>
</head>

<body>
  <form id="Form1" runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"  />
  <div id="pageWidth">

    <div id="topBanner">
      <img src="../Content/images/McGladreyLogo_app.jpg" />
      <div id="topBannerRight">
        <asp:HyperLink ID="linkHostSite" CssClass="linkHostSite" runat="server">return to host site</asp:HyperLink>
      </div>
      <div id="appTitle">Cloud-hosted App REST Demo</div>
    </div>

    <div id="contentBox">

      <h2>App Web Title (synchronous read)</h2>
      <div>
        <asp:Label ID="lblAppWebTitle" runat="server" />
      </div>

      <h2>App Web Title (asynchronous read)</h2>
      <div id="appwebtitle" class="async_placeholder">
        <img src="../Content/images/spinning_gears.gif" alt="loading..." />
        <span class="async_placeholder_text">Please wait while we get your data...</span>
      </div>

      <h2>App Web Lists</h2>
      <div id="panelNewList">
        <asp:UpdatePanel ID="upNewList" runat="server">
          <ContentTemplate>
            <table>
              <tr>
                <td colspan="2">
                  <asp:Button ID="cmdCreateNewList" runat="server" Text="Create New Lists" Width="100%" OnClick="cmdCreateNewList_Click"  />
                </td>
              </tr>
              <tr>
                <td>List Title:</td>
                <td><asp:TextBox ID="txtNewListTitle" runat="server" Text="List1" /></td>
              </tr>
              <tr>
                <td>List Type:</td>
                <td>
                  <asp:RadioButtonList ID="lstListType" runat="server">
                    <asp:ListItem Selected="True" Value="100" Text="Custom" />
                    <asp:ListItem Value="105" Text="Contacts" />
                    <asp:ListItem Value="106" Text="Events" />
                    <asp:ListItem Value="107" Text="Tasks" />
                  </asp:RadioButtonList>
                </td>
              </tr>
              <tr>
                <td colspan="2">
                  <asp:Label ID="lblStatus" runat="server" CssClass="statusLabel" >&nbsp;</asp:Label>
                </td>
              </tr>
            </table>
          </ContentTemplate>
        </asp:UpdatePanel>
      </div>

      <div id="appweblists" class="async_placeholder">
        <img src="../Content/images/spinning_gears.gif" alt="loading..." />
        <span class="async_placeholder_text">Please wait while we get your data...</span>
      </div>


      </div>
  </div>
  </form>
</body>
</html>
